package com.fivefu.core.hillstone.dto.request;

import com.fivefu.base.common.utils.str.StrUtils;
import io.swagger.annotations.ApiModelProperty;

public class PlayBackURIDto {

    @ApiModelProperty(value = "视频通道编码",required = true)
    private String channelCode;

    @ApiModelProperty(value = "视频文件资源路径")
    private String resource;

    @ApiModelProperty(value = "开始回放时间。时间格式:YYYYMMDDTHHmmssZ",required = true)
    private String beginTime;

    @ApiModelProperty(value = "结束回放时间。时间格式:YYYYMMDDTHHmmssZ",required = true)
    private String endTime;

    @ApiModelProperty(value = "录像存储位置",required = true)
    private String location;

    @ApiModelProperty(value = "协议类型，支持RTSP、RTMP、HLS三种。默认RTSP")
    private String scheme;

    @ApiModelProperty(value = "有效时间")
    private int duration;

    public String getChannelCode() {
        return channelCode;
    }

    public void setChannelCode(String channelCode) {
        this.channelCode = channelCode;
    }

    public String getResource() {
        return resource;
    }

    public void setResource(String resource) {
        this.resource = resource;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getScheme() {
        return scheme;
    }

    public void setScheme(String scheme) {
        this.scheme = scheme;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public String getParam() {
        return "?channelCode=" + channelCode + "&resource=" + StrUtils.isCheckNull(resource) + "&beginTime=" + beginTime
                + "&endTime=" + endTime + "&location=" + location + "&scheme=" + StrUtils.isCheckNull(scheme)
                + "&duration=" + StrUtils.isCheckNull(String.valueOf(duration));
    }
}
